package com.cheyun.netsalev3.bean

data class DataX(
        val calltype: Int,
        val dccname: String,
        val endtime: String,
        val starttime: String,
        val record: String,
        val state: Int,
        val times: Int
) {
    var calltypeName = ""
    var callstateName = ""
    var timesName = ""
    //初始化显示数据
    fun initData() {
        calltypeName = when (calltype) {
            0 -> "其他"
            1 -> "去电"
            2 -> "来电"
            else -> ""
        }
        callstateName = when (state) {
            1 -> "接通"
            0 -> "未接通"
            else -> ""
        }
        timesName = (times / 60).toString() + "分" + times % 60 + "秒"


    }
}